//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;

namespace OpenLS.Drawing
{
    public class AlphaBiLevelEffect : Effect
    {
        private int thresh;

        public int Thresh
        {
            get { return thresh; }
            set { thresh = value; }
        }

        internal override void ReadXmlCore(ReadContext context)
        {
            using (var c = context.Read("alphaBiLevel"))
            {
                Thresh = c.GetInteger("thresh");
            }
        }

        internal override void WriteXmlCore(WriteContext context)
        {
            using (WriteContext c = context.Write("alphaBiLevel"))
            {
                c.SetInteger("thresh", Thresh);
            }
        }
    }
}